/*
 *    This program is free software; you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation; either version 2 of the License, or
 *    (at your option) any later version.
 *
 *    This program is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    2013 year
 *    Author: Esipenko Aleksey (Alexorleon)
 *    E-Mail: alexorleon@gmail.com
 */
#ifndef CREATENEWQR_H
#define CREATENEWQR_H

#include <QtSql>
#include <QDialog>

namespace Ui {
class CreateNewQR;
}

class CreateNewQR : public QDialog
{
    Q_OBJECT
    
public:
    explicit CreateNewQR(QWidget *parent = 0);
    ~CreateNewQR();

    void deleteFiles();
private:
    Ui::CreateNewQR *ui;

    void createConnections();
    void requestdatabase();
    void GenerateQRCode();
    int generateQR();

    bool isEmpty;
    int idPerform;
    QString pathfile;
    QString path;

    QStringList listCreateImages;
private slots:
    void slot_countSimbols();
    void slot_selectPerform();
    void slot_checkFile();
    void slot_selectFile();
    void slot_createQR();
};

#endif // CREATENEWQR_H
